package cn.chitanda.weather.data.weather

import android.os.Parcelable
import com.google.gson.annotations.SerializedName
import kotlinx.android.parcel.Parcelize

@Parcelize
data class Forecast(
    @SerializedName("date") val date: String,
    @SerializedName("tmp_max") val tmp_max: String,
    @SerializedName("tmp_min") val tmp_min: String,
    @SerializedName("cond_txt_d") val cond_txt_d: String,
    @SerializedName("cond_txt_n") val cond_txt_n: String

) : Parcelable {
    val tmp: String
        get() = "$tmp_min / $tmp_max ℃"

    override fun toString(): String {
        return "$date \n\n\n 白天 $cond_txt_d \n\n\n $tmp_min℃ - $tmp_max℃ \n\n\n 夜晚 $cond_txt_n"
    }
}